package com.e3.web.widget.client;

import java.util.List;

import com.extjs.gxt.ui.client.data.BeanModelReader;
import com.extjs.gxt.ui.client.data.DataReader;
import com.extjs.gxt.ui.client.data.ModelData;

public class BeanModelReaderAdapter implements DataReader<List<ModelData>> {

	private BeanModelReader reader;

	public BeanModelReaderAdapter(BeanModelReader reader) {
		this.reader = reader;
	}

	public List<ModelData> read(Object loadCfg, Object data) {
//		if (loadCfg != null)
//			return null;
		List<ModelData> result = reader.read(loadCfg, data).getData();
		return result;
	}
}